package com.example.wallpaperapp.ui.activity;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.example.wallpaperapp.R;
import com.example.wallpaperapp.base.BaseActivity;
import com.example.wallpaperapp.bean.FindPreviewBean;
import com.example.wallpaperapp.bean.PreviewBean;
import com.example.wallpaperapp.utils.StatusBar;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;

public class PreviewActivity extends BaseActivity {
    ImageView imageView;
    int sourceId;
    public static void startPreviewActivity(Context context, int sourceId){
        Intent intent = new Intent(context,PreviewActivity.class);
        intent.putExtra("sourceId",sourceId);
        context.startActivity(intent);
    }
    public static void startPreviewActivity(Context context, PreviewBean bean){
        Intent intent = new Intent(context,FindPreviewActivity.class);
        List<PreviewBean> list = new ArrayList<>();
        list.add(bean);
        Bundle bundle = new Bundle();
        bundle.putSerializable("datas", (Serializable) list);
        intent.putExtras(bundle);
        context.startActivity(intent);
    }
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        StatusBar.SetStatusBar(getWindow());
        super.onCreate(savedInstanceState);
    }
    @Override
    protected int initLayout() {
        return R.layout.activity_preview;
    }
    @Override
    protected void initView() {
//        imageView = findViewById(R.id.ima_ground);
        sourceId = getIntent().getIntExtra("sourceId",0);
        imageView.setImageResource(sourceId);
    }
    @Override
    protected void initData() {
    }
}